import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'index',
    component: () => import('../views/index'),
    children: [
      {
        path: '/home',
        name: 'home',
        component: () => import('../components/two/home'),
      },
      {
        path: '/',
        redirect:"home"
      },
      {
        path: '/goods',
        name: 'goods',
        component: () => import('../components/two/goods'),
      },
      {
        path: '/about',
        name: 'about',
        component: () => import('../components/two/about'),
      },
      {
        path: '/detailed',
        name: 'detailed',
        component: () => import('../components/two/detailed'),
      },
      {
        path: '/cate',
        name: 'cate',
        component: () => import('../components/two/cate'),
      },
      {
        path: '/order',
        name: 'order',
        component: () => import('../components/two/order'),
      },
      {
        path: '/store',
        name: 'store',
        component: () => import('../components/two/store'),
      },
      {
        path: '/confirmOrder',
        name: 'confirmOrder',
        component: () => import('../components/two/confirmOrder'),
      },
    ]
  },



]

const router = new VueRouter({
  routes
})

export default router
